package com.example.nna.voz;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.nna.main.R;

public class MylistView extends BaseAdapter{
	public LayoutInflater inflater; 
    public ViewHolder holder;  
    public Handler mHandler ;
    public float mTextSize1;
    public float mTextSize2;
    public float mTextSize3;
    public float mTextSize4;
    public Context context;
    public ArrayList<contain> contains;
    public MylistView(Activity context,Handler handler, ArrayList<contain> contains) {  
		 this.context = context;
		 this.contains = new ArrayList<contain>(contains);
	     this.mHandler = handler;
	     this.inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);  
	}  
	void setSize(float mTextSize){
		TextView t1 = (TextView)inflater.inflate(R.layout.list_item, null).findViewById(R.id.text1);
		TextView t2 = (TextView)inflater.inflate(R.layout.list_item, null).findViewById(R.id.text2);
		TextView t3 = (TextView)inflater.inflate(R.layout.list_item, null).findViewById(R.id.text3);
		TextView t4 = (TextView)inflater.inflate(R.layout.list_item, null).findViewById(R.id.text4);
		this.mTextSize1 = t1.getTextSize()*mTextSize;
		this.mTextSize2 = t2.getTextSize()*mTextSize;
		this.mTextSize3 = t3.getTextSize()*mTextSize;
		this.mTextSize4 = t4.getTextSize()*mTextSize;
	}
	public static class ViewHolder  
	{  
        ImageView imgView;  
        TextView txtView1;  
        TextView txtView2;
        TextView txtView3;  
        TextView txtView4;  
        RelativeLayout layout;
	}  
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return contains.size(); 
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		return arg1;
	}

}
